{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "123ec358-4961-44c7-b948-2ca6b527e8db",
   "metadata": {},
   "outputs": [],
   "source": [
    "import os\n",
    "\n",
    "os.environ[\"OPENAI_API_KEY\"] = \"sk-your-key\""
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "62045a7b-6231-419b-8edf-76de9ca00eb7",
   "metadata": {},
   "outputs": [],
   "source": [
    "# Import and initialize our tool spec\n",
    "from llama_index.tools.zapier.base import ZapierToolSpec\n",
    "\n",
    "zapier_spec = ZapierToolSpec(api_key=\"sk-ak-your-key\")\n",
    "tools = zapier_spec.to_tool_list()\n",
    "\n",
    "# Create the Agent with our tools\n",
    "from llama_index.core.agent.workflow import FunctionAgent\n",
    "from llama_index.llms.openai import OpenAI\n",
    "\n",
    "agent = FunctionAgent(\n",
    "    tools=zapier_spec.to_tool_list(),\n",
    "    llm=OpenAI(model=\"gpt-4.1\"),\n",
    ")\n",
    "\n",
    "print(await agent.run(\"what actions are available\"))\n",
    "print(await agent.run(\"Can you find the taco night file in google drive\"))"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
